package com.tangyuan.Singleton;

public class UserService {

    private static volatile UserService instance = null;

    private UserService(){}

    public static UserService getInstance(){
        if(instance == null){
            synchronized (UserService.class){
                if(instance == null){
                    return new UserService();
                }
            }
        }
        return instance;
    }

    public String getUserInfo(){
        return "tangyuan";
    }
}
